<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Modern UI CSS">
    <meta name="author" content="Sergey Pimenov">
    <meta name="keywords" content="windows 8, modern style, modern ui, style, modern, css, framework">

    <link href="css/modern.css" rel="stylesheet">
    <link href="css/site.css" rel="stylesheet" type="text/css">
    <link href="js/google-code-prettify/prettify.css" rel="stylesheet" type="text/css">

    <script src="js/jquery-1.8.2.min.js"></script>
    <script src="js/google-analytics.js"></script>
    <script src="js/github.info.js"></script>
    <script src="js/google-code-prettify/prettify.js"></script>
    <script src="js/pagecontrol.js"></script>

    <title>Reservation Summary</title>
</head>

<body class="modern-ui" onload="prettyPrint()">

<%
	String username = request.getParameter("username");
%>
    <div class="page secondary">

        <div class="page-header">
            <div class="page-header-content">
                <h1>Reservation ID ${resInfo.num}</h1>
                <a href = "/Website/BackButtonURL?username=<%=username %>" class="back-button big page-back"></a>
            </div>
        </div>

        <div class="page-region">
            <div class="page-region-content">
				<br>
				<br>
				<br>

                <div class="page-control span10" data-role="page-control">
                    <ul>
                        <li class="active"><a href="#page1">Flight</a></li>
                    </ul>
					
                    <div class="frames">
                        <div class="frame active" id="page1">
                            <table class="hovered" style="padding: 20px; width: 700px;">
	                            	<thead>
										<tr>
											<th class="left">FlightID</th>
											<th class="left">Airline</th>																	
											<th class="left">Departing</th>
											<th class="left">Arriving</th>
											<th class="left">Price</th>
										</tr>
										
										<tbody>

											<tr>									
												<td><c:out value="${resInfo.flightID}"/></td>				
												<td><img src = "<c:out value="${resInfo.image}" />"/></td>
												
												<td>
													<c:out value="${resInfo.departing}" />
													<br>
													<c:out value="${resInfo.departingDate}" />
													<br>
													<c:out value="${resInfo.departingTime}" />
												</td>
												
												<td>
													<c:out value="${resInfo.arriving}" />
													<br>
													<c:out value="${resInfo.arrivingDate}" />
													<br>
													<c:out value="${resInfo.arrivingTime}" />
												</td>
												<td><c:out value="${resInfo.fullPrice}" /></td>		
											</tr>
													
										</tbody>	
						
									</thead>
	                            </table>
                        </div>
                    	<form action = "/Website/RefundFlightURL" method = "get">
		                	<input type="submit" value="Change Flight" style="margin-left: 680px"/>
		                	<input type = "hidden" name = "resID" value = ${resInfo.num}>
		                	<input type = "hidden" name = "username" value = ${resInfo.username}>
		                </form>
                    </div>
                 </div>
                 
                 <br>
                 <br>
         		
         		<div class="page-control span11" data-role="page-control">
         			<ul>
                        <li class="active"><a href="#page1">General</a></li>
                    </ul>
                    
                    <div class="frames">
                        <div class="frame active" id="page1">
                        
                        	<img src="/Website/icon/seat.png" />
                            <table class="hovered" style="padding: 20px; width: 700px;">
                            	<thead>
									<tr>
									<th class="Left">Name</th>
										<th class="Left">Seat ID</th>
										<th class="left">Class</th>
										<th class="left">Meal</th>
									</tr>
										<tbody>
											<tr>	
												<td><c:out value="${resInfo.fullName}" /></td>												
												<td><c:out value="${seatInfo.seatID}" /></td>
												<td><c:out value="${seatInfo.type}" /></td>
												<td><c:out value="${resInfo.meal}" /></td>
											</tr>			
										</tbody>						
								</thead>
                            </table>
                        </div>
                        
                        <form action = "/Website/ModResURL" method = "get">
                        	<input type = "hidden" name = "resID" value = ${resInfo.num}>
                        	<input type = "hidden" name = "username" value = ${resInfo.username}>
                        	<input type = "hidden" name = "firstName" value = ${resInfo.firstName}>
                        	<input type = "hidden" name = "lastName" value = ${resInfo.lastName}>
                        	<input type = "hidden" name = "seatID" value = ${resInfo.seat}>
                        	<input type = "hidden" name = "flightID" value = ${resInfo.flightID}>
                        	<input type = "hidden" name = "meal" value = ${resInfo.meal}>
		                	<input type="submit" value="Modify" style="margin-left: 760px"/>
		                </form>
                 	</div>               
             	</div>
             	
             	<br>
                <br>
  
                

            </div>
        </div>
    </div>
</body>
</html>